package com.example.cloud.dao.business.medical;

import com.example.cloud.model.business.medical.ExecuteRecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by wangtao on 2018/5/17.
 */
@Repository
public interface ExecuteRecordRepository extends JpaRepository<ExecuteRecord,Long> {
    List<ExecuteRecord> findByIdIn(List<Long> ids);
    List<ExecuteRecord> findByPatientIdAndDeleteFlag(Long patientId, int deleteFlag);
    List<ExecuteRecord> findByIdInAndDeleteFlag(Long[] ids, int deleteFlag);
    List<ExecuteRecord> findByIdInAndDeleteFlagOrderByCreationTimeDesc(Long[] ids, int deleteFlag);
    int deleteByIdIn(List<Long> ids);
    int countByOrderIdAndDeleteFlag(Long orderId, int deleteFlag);
}
